import{E as e,Lt as t,Zn as n,b as r,g as i,k as a,mt as o,tr as s,v as c,wt as l,xt as u,y as d}from"./CIxmKYxc4tZcJF.js";import"./AuTu7hII1ERTdj.js";var f=[`href`,`target`,`aria-label`,`aria-disabled`,`tabindex`],p=[`tabindex`,`disabled`,`aria-label`,`aria-disabled`],m=a({__name:`oui-button`,props:{title:{},mode:{default:`neutral`},size:{default:`normal`},dropdown:{type:Boolean,default:!1},outline:{type:Boolean,default:!1},href:{},target:{default:`_blank`},disabled:{type:Boolean,default:!1},focusable:{type:Boolean,default:!0},icon:{}},setup(a){let m=a,h=t(),g=i(()=>{let e=h.default?.({});return!e||e.length===0?``:e.map(e=>typeof e.children==`string`?e.children:``).join(``)}),_=i(()=>(m.title||g.value||``).trim()),v=i(()=>[`oui-button`,m.mode&&`_button_mode_${m.mode}`,m.size&&`_button_size_${m.size}`,m.dropdown&&`_button_dropdown`].filter(Boolean));return(t,i)=>a.href&&!a.disabled?(o(),r(`a`,{key:0,href:a.href,target:a.target,class:n(v.value),role:`button`,"aria-label":_.value,"aria-disabled":a.disabled,tabindex:a.focusable?0:-1},[a.icon?(o(),c(l(a.icon),{key:0,"aria-hidden":`true`})):d(``,!0),u(t.$slots,`default`,{},()=>[e(s(a.title),1)])],10,f)):(o(),r(`button`,{key:1,tabindex:a.focusable?0:-1,disabled:a.disabled?!0:void 0,class:n(v.value),"aria-label":_.value,"aria-disabled":a.disabled},[a.icon?(o(),c(l(a.icon),{key:0,"aria-hidden":`true`})):d(``,!0),u(t.$slots,`default`,{},()=>[e(s(a.title),1)])],10,p))}});export{m as t};